from __future__ import annotations

import abc
from typing import Any

class Adapter(abc.ABC):
    """Base class for value adapters."""

    name: str = ""

    @abc.abstractmethod
    def supports(self, gdb_value) -> bool:
        """Return True if this adapter can handle the given gdb.Value."""
        raise NotImplementedError

    @abc.abstractmethod
    def serialize(self, gdb_value) -> Any:
        """Return JSON-serializable representation."""
        raise NotImplementedError